package com.java.threadsafe.vsafe3;

public class Safe {
	public static void main(String args[]) {
		Runnable entity = new ThreadSafeEntityUserThreadLocal();
		Thread thread1 = new Thread(entity, "thread1");
		Thread thread2 = new Thread(entity, "thread2");
		thread1.start();
		thread2.start();
	}
}

/* 运行结果:
	thread1 ---- 2
	thread2 ---- 2
	thread1 ---- 3
	thread2 ---- 3
	thread1 ---- 4
	thread2 ---- 4
	thread1 ---- 5
	thread2 ---- 5
	thread1 ---- 6
	thread2 ---- 6
*/